package ${pkg}.dao;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import ${pkg}.bean.${upTumTabNam}Bean;

/**
 * @AUTHOR LUYU
 */
@Repository(value="Base${upTumTabNam}Dao")
public interface Base${upTumTabNam}Dao {

	<#if hasPk>
	public ${upTumTabNam}Bean selectByPK(${upTumTabNam}Bean ${lowTumTabNam});

	</#if>
	public List<${upTumTabNam}Bean> select(${upTumTabNam}Bean ${lowTumTabNam});

	<#if hasPk>
	public void delete(${upTumTabNam}Bean ${lowTumTabNam});

	</#if>
	public void deletes(${upTumTabNam}Bean ${lowTumTabNam});

	<#if hasPk>
	public void update(${upTumTabNam}Bean ${lowTumTabNam});

	</#if>
	public void updates(@Param("value") ${upTumTabNam}Bean value,
			@Param("condition") ${upTumTabNam}Bean condition);

	public void insert(${upTumTabNam}Bean ${lowTumTabNam});
	
	public List<${upTumTabNam}Bean> selectPage(@Param("${lowTumTabNam}") ${upTumTabNam}Bean ${lowTumTabNam}, @Param("offset") int offset, @Param("pageSize") int pageSize);
	
	public int selectTotal(${upTumTabNam}Bean ${lowTumTabNam});
	
	public void insertBatch(List<${upTumTabNam}Bean> ${lowTumTabNam});
	
	public List<Map<String,Object>> selectBySql(String sql);
	
	public int selectTotalBySql(String sql);
}
